package com.it.common.crash;

import android.content.Context;
import android.util.Log;

import com.it.common.utils.LogUtil;

import java.lang.Thread.UncaughtExceptionHandler;

public class CrashExceptionHandler implements UncaughtExceptionHandler {
    private final Context mContext;

    public CrashExceptionHandler(Context context) {
        mContext = context;
    }

    @Override
    public void uncaughtException(Thread thread, Throwable ex) {
        LogUtil.d("CrashExceptionHandler", "捕获异常 : " + ex.toString() + ", 线程 : " + thread.getName() + "异常堆栈：" + Log.getStackTraceString(ex));
    }

}